package com.youhp.spire.xls.demo.Workbook;

import com.spire.xls.*;
import java.io.*;

public class ReadStream {
    public static void main(String[] args) throws FileNotFoundException {
        String inputFile = "data/ReadStream.xlsx";
        String outputFile = "output/ReadStream_out.xlsx";

        //Create a workbook
        Workbook workbook = new Workbook();

        //Open Excel from a stream
        FileInputStream fileStream = new FileInputStream(inputFile);

        //Load Excel from stream
        workbook.loadFromStream(fileStream);

        //Save the Excel file
        workbook.saveToFile(outputFile, ExcelVersion.Version2013);
    }
}
